<div id="picture_header" class="picture_header">
<h1 class="image_title"><%= @picture.title %></h2>
<p>Autor:
<%= @author.nick_or_full_name %>
</p>
</div>
<%= image_tag "/images/storage/#{@picture.id}/large.jpg", :alt => @picture.title, :class => "main_image", :onClick => "znikacz()" %>
<table id="exif" class="exif">
<tr><td>Aparat: <%= @picture.camera %></td><td>Ogniskowa: <%= @picture.focal_length %></td></tr>
<tr><td>Czas naświetlania: <%= @picture.exposure_time %></td><td>Przysłona: <%= @picture.fnumber %></td></tr>
<tr><td>ISO: <%= @picture.iso_speed %></td><td>Data cyknięcia: <%= @picture.added_at %></td></tr>
</table>
<div id="del" class="delete">
<% if session[:user_id] %>
	<% if session[:user_id] == @author.id or User.find(session[:user_id]).is_admin %>
		<%= link_to "Usuń zdjęcie", :action => 'delete', :controller => 'picture', :params => {:id => @picture.id} %>
	<% end %>
<% end %>
</div>
<div id="score" class="score">
	<%= render :partial => "votes" %>
</div>
<p id="description" class="description"><%= @picture.description %></p>

<div id="comments">
<h2>Komentarze</h2>
<% paginated_section @comment, :prev_label => "< Poprzednia strona", :next_label => "Następna strona >" do %>
	<%= render :partial => @comment %>
<% end %>

<% if session[:user_id] -%>
<% remote_form_for [@picture, Comment.new] do |f| %>
	<p>
	<%= f.label :body, "Nowy komentarz" %><br />
	<%= f.text_area :body %>
	</p>
	<p><%= f.submit "Dodaj komentarz" %></p>
<% end -%>
<% else -%>
	<p>Chcesz dodać komentarz ? <%= link_to "Zaloguj się ...", :controller => "site", :action => "login" %></p>
<% end %>
</div>